const { ipcRenderer } = require('electron');

ipcRenderer.on('set-localStorage', (event, params) => {
    console.log(params)
     Object.entries((params)).forEach(([key, value]) => {
                  console.log(key,value)
                  localStorage.setItem(key, value);
                  // });
      });

      ipcRenderer.send('set-localStorage-response', 'success', 'LocalStorage updated Fail');

});

// preload.js
window.addEventListener('DOMContentLoaded', () => {
    document.addEventListener('click', (event) => {
      console.log('Element clicked:', event);
      // Add any custom logic here
    });
  
    document.addEventListener('contextmenu', (event) => {
      console.log('Right-click on element:', event);
      // Add any custom logic here
      event.preventDefault(); // Optionally prevent the default context menu
    });
  });
  